﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:WinRTXamlToolkit.Controls"
    xmlns:controlsPrimitives="using:WinRTXamlToolkit.Controls.Primitives">
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary
            x:Key="Light">
            <SolidColorBrush
                x:Key="CalendarBackground"
                Color="#00000000" />
            <SolidColorBrush
                x:Key="CalendarBorderBrush"
                Color="#80000000" />
        </ResourceDictionary>
        <ResourceDictionary
            x:Key="Default">
            <SolidColorBrush
                x:Key="CalendarBackground"
                Color="#00FFFFFF" />
            <SolidColorBrush
                x:Key="CalendarBorderBrush"
                Color="#80FFFFFF" />
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <x:Double
        x:Key="CalendarFontSize">36</x:Double>

    <!-- Calendar Style -->
    <Style
        TargetType="controls:Calendar">
        <Setter
            Property="FontFamily"
            Value="{StaticResource ContentControlThemeFontFamily}" />
        <Setter
            Property="FontWeight"
            Value="Bold" />
        <Setter
            Property="Padding"
            Value="10,10" />
        <Setter
            Property="FontSize"
            Value="{StaticResource CalendarFontSize}" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="Background"
            Value="{StaticResource CalendarBackground}" />
        <Setter
            Property="BorderBrush"
            Value="{StaticResource CalendarBorderBrush}" />
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:Calendar">
                    <Grid
                        x:Name="Root"
                        HorizontalAlignment="Center">
                        <!--TODO: TextOptions.TextHintingMode="Fixed"-->
                        <controlsPrimitives:CalendarItem
                            x:Name="CalendarItem"
                            FontFamily="{TemplateBinding FontFamily}"
                            FontWeight="{TemplateBinding FontWeight}"
                            FontSize="{TemplateBinding FontSize}"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>